The Sudoku Game is a one player game that allows player to play, solve, receive hints, and saved current Sudoku puzzles. A player must created an account in order to save a game. Any user can be able to start with a blank puzzle and after inserting values may get a hint or have the puzzle solved by the system.
Use-Case Models
System Actors
Guest User - Can use solver and get hints on an inputted Sudoku. Can also play a manually entered Suduko.
Player - Registered user that has logged on. Can play, save in-progress games, use solver, and get hints.
Use Case Diagram
Use Cases
UC1: Play a generated Sudoku
Primary Actor
Player
Preconditions
Valid Login for the Player
Main Success Scenario
Player selects to Play New Sudoku
The system generates a random Sudoku.
The Sudoku is saved under the Player's account.
Player begins inserting numbers into blank cells.
The system validates the Player's inputs for rules violations.
The system removes entered value from associated cells available values.
The system saves grid layout after each valid input.
When all cells are entered, the system tells Player of success.
Alternative Scenario Extensions
a. Player can leave game at anytime and the grid is saved for later playing.
b. Hints button is pressed
Player presses Hint button.
System determines one valid move.
System inserts solution into grid.
Control is given back to Player.
c. Solve button is pressed
Player presses Solve button.
System generates a grid solution for the current grid.
System inserts solution into grid
Control is given back to Player.
d. Player enters invalid value.
Player enters a value that is fails the rules validation.
System prompts Player of invalid entry.
Value is not removed from associated cells available values.
UC2: Play a saved Sudoku
Primary Actor
Player
Preconditions
Valid Login for the Player
Previous game was saved
Main Success Scenario
Player selects to Play Saved Sudoku.
The system fills in grid with saved information.
Player begins inserting numbers into blank cells.
The system validates the Player's inputs for rules violations.
The system removes entered value from associated cells available values.
The system saves grid layout after each valid input.
When all cells are entered, the system tells Player of success.
Alternative Scenario Extensions
a. Player can leave game at anytime and the grid is saved for later playing.
b. Hints button is pressed
Player presses Hint button.
System determines one valid move.
System inserts solution into grid.
Control is given back to Player.
c. Solve button is pressed
Player presses Solve button.
System generates a grid solution for the current grid.
System inserts solution into grid
Control is given back to Player.
d. Player enters invalid value.
Player enters a value that is fails the rules validation.
System prompts Player of invalid entry.
Value is not removed from associated cells available values.
UC3: Play a blank Sudoku
Primary Actor
Player or Guest User (Both refereed to as User in this UC)
Preconditions
None
Main Success Scenario
User selects to use a blank grid.
System provides a blank grid.
User inputs values anywhere on the grid.
System will validate values inputted by user.
The system removes entered value from associated cells available values.
No gird information will be saved.
When all cells are entered, the system tells Player of success.
Alternative Scenario Extension
a. User leaves game
User quits game.
Grid is discarded and not saved by system.
b. Hints button is pressed
User presses Hint button.
System determines one valid move.
System inserts solution into grid.
Control is given back to User.
c. Solve button is pressed
User presses Solve button.
System generates a grid solution for the current grid.
System inserts solution into grid
Control is given back to User.
d. Player enters invalid value.
Player enters a value that is fails the rules validation.
System prompts Player of invalid entry.
Value is not removed from associated cells available values.
UC4: Generate a Hint
Primary Actor
System
Preconditions
Player or Guest User pressed Hint button.
Main Success Scenario
System iterates through each cell with an inputted value.
System removes inputted value from each cell's available values in that row.
System removes inputted value from each cell's available values in that column.
System removes inputted value from each cell's available values in the sub-square.
System iterates through every cell's available values search for a cardinality of one.
If a cardinality of one is found, the system inserts the value into the grid.
Alternative Scenario Extension
a. No available cell has a cardinality of one.
To prevent an infinite loop the system will clone the current grid and make an random selection of one cell's available values and try to solve the grid.
If solution found, the randomly selected value will be inserted into the grid.
If no solution found with the copy, the system will randomly select another value from the available values and repeat steps 1-2 until a solution is found.
UC5: Generate a Solution
Primary Actor
System
Preconditions
Player or Guest User pressed Solve button.
Main Success Scenario
System iterates through each cell with an inputted value.
System removes inputted value from each cell's available values in that row.
System removes inputted value from each cell's available values in that column.
System removes inputted value from each cell's available values in the sub-square.
System iterates through every cell's available values search for a cardinality of one.
If a cardinality of one is found, the system inserts the value into the grid.
Repeat steps 1-6 until all grid cells have a value.
Alternative Scenario Extension
a. No available cell has a cardinality of one.
To prevent an infinite loop the system will clone the current grid and make an random selection of one cell's available values and try to solve the grid.
If solution found, the copied grid's values will be inserted into the main grid.
If no solution found with the copy, the system will randomly select another value from the available values and repeat steps 1-2 until a solution is found.
Inception
Vision
The Sudoku Game is a one player game that allows player to play, solve, receive hints, and saved current Sudoku puzzles. A player must created an account in order to save a game. Any user can be able to start with a blank puzzle and after inserting values may get a hint or have the puzzle solved by the system.Use-Case Models
System Actors
Use Case Diagram
Use Cases
UC1: Play a generated Sudoku
b. Hints button is pressed
- Player presses Hint button.
- System determines one valid move.
- System inserts solution into grid.
- Control is given back to Player.
c. Solve button is pressed- Player presses Solve button.
- System generates a grid solution for the current grid.
- System inserts solution into grid
- Control is given back to Player.
d. Player enters invalid value.UC2: Play a saved Sudoku
b. Hints button is pressed
- Player presses Hint button.
- System determines one valid move.
- System inserts solution into grid.
- Control is given back to Player.
c. Solve button is pressedd. Player enters invalid value.
UC3: Play a blank Sudoku
- User quits game.
- Grid is discarded and not saved by system.
b. Hints button is pressed- User presses Hint button.
- System determines one valid move.
- System inserts solution into grid.
- Control is given back to User.
c. Solve button is pressedd. Player enters invalid value.
UC4: Generate a Hint
UC5: Generate a Solution